Unity Rigidbody how to set zero momentum

81

Unity Rigidbody how to set zero momentum -

var rigidbody = GetComponent<Rigidbody>();
// or in case you get it from another object or component
//var rigidbody = otherObjectOrComponent.GetComponent<Rigidbody>();

rigidbody.velocity = Vector3.zero;
rigidbody.angularVelocity = Vector3.zero;

Comments

Submit
0 Comments